<template>
  <div class="cover"
       @click="$emit('onClose')"
       :style="{zIndex: zIndex}">
    <slot></slot>
  </div>
</template>
<script>
export default {
  props: {
    zIndex: {
      type: Number,
      default: 1
    }
  }
}
</script>
<style scoped lang = 'scss'>
.cover {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.4);
}
</style>